<template>
  <layout :config="navConfig">
    <template #default>
      <div class="m-service_box">
        <div class="login-logo">
          <img src="../assets/img/SD-01.png" style="width: 100px;height: 100px">
        </div>
        <div class="answer-box">
          <div
            v-for="($item,$index) in listData"
            :class="['answer-item',{active: $item.isActive}]"
            :key="$item.title"
          >
            <div class="title-info" @click="$item.isActive = !$item.isActive">
              <em>{{$index+1}}</em>
              <span>{{$item.title}}</span>
              <i class="iconfont icon-arrow-right-s-line"></i>
            </div>
          </div>
        </div>
      </div>
    </template>
  </layout>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import { INavigation } from "@/types";

@Component({
  name: "Service",
    created: function () {
        let usera = JSON.parse(localStorage.getItem('users1'));

        if(usera==null){
            this.$router.push({
                path: '/login'
            })
            return;
        }

        Toast.loading("请求中...");
        this.$api.paylist({search_EQ_payuser:usera.username}).then(res => {
            Toast.hide();
            if (res.success == 200) {
                this.listData = res.data;
            }
        }).catch(res => {

        })


    },
})
export default class extends Vue {
  navConfig: INavigation = {
    text: "我的资产"
  };

  listData = [
    {
      title: "200",
      isActive: false
    },
    {
      title: "200",
      isActive: false
    },
    {
      title: "200",
      isActive: false
    }
  ];
}
</script>

<style lang="scss">
@import "../assets/styles/service.scss";
</style>

